<header data-am-widget="header" class="am-header am-header-default sq-head ">
	<div class="am-header-left am-header-nav">
		<a href="javascript:history.back()" class="">
			<i class="am-icon-chevron-left"></i>
		</a>
	</div>
	<h1 class="am-header-title">
		<a href="" class="">登录</a>
	</h1>
</header>
<div style="height: 49px;"></div>
<!--<div class="login-logo">
	<img src="images/logo.png" />
</div>-->
<div style="height: 3rem;"></div>
<form class="layui-form" action="">
	<input type="text" name="phone" id="mobile" placeholder="请输入手机号" value="15674869541" class="login-name">
	<input type="password" name="password" id="password" placeholder="请输入密码" value="123123123" class="login-password">
	<button class="login-btn" lay-submit lay-filter="login">登陆</button>
</form>
<div class="agree">
	<a href="{:url('index/Reg/index')}">免费注册</a>
	<a href="forgetpassword.html" class="forget">忘记密码？</a>
</div>
<div class="line"></div>
<div class="line-text">第三方账号登录</div>
<ul class="second-login">
	<li><a href=""><img src="__STATIC__/images/wxlogin.png"/></a></li>
	<li><a href="{:url('index/Login/qqLogin')}"><img src="__STATIC__/images/qqlogin.png"/></a></li>
	<li><a href=""><img src="__STATIC__/images/sinalog.png"/></a></li>
</ul>
<script>
    //Demo
    layui.use('form', function(){
        var form = layui.form;
        //监听提交
        form.on('submit(login)', function(data){
            $.post("{:url('index/Login/checkLogin')}",data.field, function(res) {
				if (res.code==1){
                    layer.alert(res.msg, {icon: 1},function (){
                        location.href=("{:url('index/My/index')}");
                    });
				}else{
                    layer.msg(res.msg, {icon: 9},function () {
                    });
				}
            });
            return false;
        });
    });
</script>